<script src="{{=url_for_static('site/site.js')}}"></script>

<custom-menu></custom-menu>
<script>
  {{
    if hasattr(request, 'user') and request.user:
      data = {
        'messages':[
          {'class':'messages-menu', 'url':'#', 'icon':'envelope-o', 'type':'success', 'count':4}
        ],
        'user': {
          'image_url':request.user.get_image_url(),
          'url':'#',
          'name':unicode(request.user),
          'email':request.user.email,
        },
        'enable_register':settings.SITE.enable_register,
      }
    else:
      data = {}
    pass
  }}
  var data = {{<< json_dumps(data)}};
  riot.mount('custom-menu', data);
</script>
